#include "NetworkMessage.h"
#include "TestBase.h"

TestBase::TestBase()
{
	info.Name = "NetworkMessage Test 2";
	info.Category = 0x2101;
	info.CategoryName = "NetworkMessage";
	info.File = __FILE__;
}

bool TestBase::Run()
{
	std::string str = "The small brown fox ran through the forest.";
	std::string strO = "";
	NetworkMessage msg1, msg2;
	msg1.AddString(str);
	msg2 = msg1;
	strO = msg2.GetString();
	if (str != strO)
	{
		std::cout << GetTestInfo()->Name << " failure info" << std::endl;
		std::cout << "Output          : " << str << std::endl;
		std::cout << "Expected output : " << strO << std::endl;
		std::cout << "Same?           : " << std::boolalpha << (str == strO) << std::endl;
	}
	return str == strO;
}